<!DOCTYPE html>
<html lang="zh-cn">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>CSS文本</title>
    <style>
      body {
        color: red;
        font-size: 20px;
      }
      p {
        height: 50px;
        /* 单行文本, 文本垂直居中: height == line-height*/
        line-height: 50px;
        border: 1px solid black;
      }
      #p1 {
        text-align: left;
        letter-spacing: 10px;
      }
      #p2 {
        color: green;
        text-align: center;
        word-spacing: 10px;
      }
      #p3 {
        color: blue;
        text-align: right;
        font-style: italic;
        font-weight: bold;
      }
      #p4 {
        text-decoration: underline;
      }
      #p5 {
        text-decoration: line-through;
        text-indent: 2em;
      }
      .sub {
        vertical-align: sub;
        font-size: 10px;
      }
      .super {
        vertical-align: super;
        font-size: 10px;
      }
    </style>
  </head>
  <body>
    <p id="p1">文本样式 CSS Style</p>
    <p id="p2">
      <span class="sub">下标</span>文本样式 CSS Style<span class="super"
        >上标</span
      >
    </p>
    <p id="p3">文本样式 CSS Style</p>
    <p id="p4">文本样式 CSS Style</p>
    <p id="p5">文本样式 CSS Style</p>
  </body>
</html>
